package com.lengxf.desiign;

import com.lengxf.desiign.file.ImageFile;
import com.lengxf.desiign.file.TextFile;
import com.lengxf.desiign.file.VideoFile;

public class Client {

    public static void main(String[] args) {
        AbstractFile folder = new Folder("所有的资料");
        AbstractFile folder1 = new Folder("图片文件");
        AbstractFile folder2 = new Folder("视频文件");
        AbstractFile folder3 = new Folder("文本文件");

        AbstractFile file1 = new ImageFile("小龙女.jpg");
        AbstractFile file2 = new ImageFile("张无忌.jpg");
        folder1.add(file1);
        folder1.add(file2);

        AbstractFile file3 = new TextFile("九阴真经.txt");
        AbstractFile file4 = new TextFile("葵花宝典.txt");
        folder3.add(file3);
        folder3.add(file4);

        AbstractFile file5 = new VideoFile("笑傲江湖.rmvb");
        folder2.add(file5);
        folder.add(folder1);
        folder.add(folder2);
        folder.add(folder3);

        folder.killVirus();

    }
}
